How can I simulate a button click in Chrome and Firefox using JavaScript